package com.atguigu.client.course;

import com.atguigu.ggkt.model.vod.Course;
import com.atguigu.ggkt.model.vod.Teacher;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author lxx
 * @version 1.0
 * @since 2022/7/3 9:58
 */
@FeignClient("service-vod")
public interface CourseFeignClient {
    /**
     * 根据关键字查询课程
     * @param keyword
     * @return
     */
    @GetMapping("/api/vod/course/course/{keyword}")
    List<Course> findByKeyword(@PathVariable String keyword);


    /**
     * 根据课程id查询课程信息
     * @param courseId
     * @return
     */
    @GetMapping("/api/vod/course/course/getById/{courseId}")
    Course getById(@PathVariable Long courseId);

    /**
     * 根据讲师id获取信息
     * @param id
     * @return
     */
    @GetMapping("/admin/vod/teacher/teacher/getTeacher/{id}")
    Teacher getTeacherLive(@PathVariable Long id);
}
